/*     */ package com.lmpop.trade.ti_financestrategy;
/*     */ 
/*     */ import com.lmpop.frame.QueryList;
/*     */ import com.lmpop.frame.SysMap;
/*     */ import com.lmpop.frame.TradeInterf;
/*     */ import com.lmpop.frame.dao.DbmInterf;
/*     */ import com.lmpop.frame.exp.ApplicationException;
/*     */ import java.util.Hashtable;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ 
/*     */ public class Ti_financestrategyInfo
/*     */   implements TradeInterf
/*     */ {
/*     */   QueryList queryList;
/*     */ 
/*     */   public Ti_financestrategyInfo()
/*     */   {
/*  18 */     this.queryList = new QueryList();
/*     */   }
/*     */ 
/*     */   public int getCountByObj(Object obj)
/*     */   {
/*  24 */     return 0;
/*     */   }
/*     */ 
/*     */   public SysMap delete(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  29 */     String pkid_string = map.getString("pkid");
/*  30 */     String result_code = "0";
/*     */     try {
/*  32 */       if (!pkid_string.equals("")) {
/*  33 */         String[] pkStr = pkid_string.split("\\|");
/*  34 */         for (int i = 0; i < pkStr.length; i++) {
/*  35 */           if (pkStr[i].equals("")) continue; delete(dbmMgr, pkStr[i]);
/*     */         }
/*     */       }
/*     */     } catch (ApplicationException e) {
/*  39 */       e.printStackTrace();
/*  40 */       result_code = "1";
/*     */     }
/*  42 */     map.setString("result_code", result_code);
/*  43 */     return map;
/*     */   }
/*     */ 
/*     */   public void delete(DbmInterf dbmMgr, String pkid) throws ApplicationException {
/*  47 */     dbmMgr.update("deleteTi_financestrategyInfoInfo", pkid);
/*     */   }
/*     */ 
/*     */   public String getSelectString(String cust_class_params)
/*     */   {
/*  53 */     List list = this.queryList.getList("getListByTi_custclassSelect");
/*  54 */     String selectString = "";
/*  55 */     String cust_class = "";
/*  56 */     String cust_class_name = "";
/*  57 */     if ((list != null) && (list.size() > 0)) {
/*  58 */       for (int i = 0; i < list.size(); i++) {
/*  59 */         Hashtable newsMap = (Hashtable)list.get(i);
/*  60 */         if ((newsMap.get("cust_calss") != null) && (!newsMap.get("cust_class").toString().equals(""))) {
/*  61 */           cust_class = newsMap.get("cust_class").toString();
/*     */         }
/*  63 */         if ((newsMap.get("cust_class_name") != null) && (!newsMap.get("cust_class_name").toString().equals(""))) {
/*  64 */           cust_class_name = newsMap.get("cust_class_name").toString();
/*     */         }
/*  66 */         if (cust_class.equals(cust_class_params))
/*  67 */           selectString = selectString + "<option value='" + cust_class + "'selected>" + cust_class_name + "</option>";
/*     */         else {
/*  69 */           selectString = selectString + "<option value='" + cust_class + "'>" + cust_class_name + "</option>";
/*     */         }
/*     */       }
/*     */     }
/*  73 */     return selectString;
/*     */   }
/*     */ 
/*     */   public List getListByPage(Object obj, int start, int limit)
/*     */   {
/*  78 */     Map ti_financestrategy = (Hashtable)obj;
/*  79 */     if (start == 0)
/*  80 */       start = 0;
/*     */     else {
/*  82 */       start = (start - 1) * limit;
/*     */     }
/*  84 */     ti_financestrategy.put("start", Integer.valueOf(start));
/*  85 */     ti_financestrategy.put("limit", Integer.valueOf(limit));
/*  86 */     return this.queryList.getList("getListTi_financestrategyByPage", ti_financestrategy);
/*     */   }
/*     */ 
/*     */   public List getListByPk(String id) {
/*  90 */     return this.queryList.getList("getTi_financestrategyInfoByPk", id);
/*     */   }
/*     */ 
/*     */   public List getListByCase_class_name(String cust_class_name) {
/*  94 */     return this.queryList.getList("getTi_financestrategyInfoBycust_class_name", cust_class_name);
/*     */   }
/*     */ 
/*     */   public SysMap insert(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  99 */     Ti_financestrategy ti_financestrategy = new Ti_financestrategy();
/* 100 */     ti_financestrategy.setMemerberleave(map.getString("memerberleave"));
/* 101 */     ti_financestrategy.setPayment(map.getString("payment"));
/* 102 */     String result_code = "0";
/*     */     try {
/* 104 */       insert(dbmMgr, ti_financestrategy);
/*     */     } catch (ApplicationException e) {
/* 106 */       e.printStackTrace();
/* 107 */       result_code = "1";
/*     */     }
/* 109 */     map.setString("result_code", result_code);
/* 110 */     return map;
/*     */   }
/*     */ 
/*     */   public void insert(DbmInterf dbmMgr, Ti_financestrategy ti_financestrategy) throws ApplicationException {
/* 114 */     dbmMgr.update("insertTi_financestrategy", ti_financestrategy);
/*     */   }
/*     */ 
/*     */   public SysMap update(DbmInterf dbmMgr, SysMap map)
/*     */   {
/* 119 */     return null;
/*     */   }
/*     */ 
/*     */   public int getPaymentByMemerberleave(String memerberleave) {
/* 123 */     List list = this.queryList.getList("getPaymentByMemerberleave", memerberleave);
/* 124 */     int payment = 0;
/* 125 */     if ((list != null) && (list.size() > 0)) {
/* 126 */       Hashtable newsMap = (Hashtable)list.get(0);
/* 127 */       if ((newsMap.get("payment") != null) && (!newsMap.get("payment").toString().equals(""))) {
/* 128 */         payment = Integer.parseInt(newsMap.get("payment").toString());
/*     */       }
/*     */     }
/* 131 */     return payment;
/*     */   }
/*     */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.trade.ti_financestrategy.Ti_financestrategyInfo
 * JD-Core Version:    0.6.0
 */